1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
Return-Path: <vasil.zlatanov@gmail.com>
Received: from gmail.com (c-2ec38a49-74736162.cust.telenor.se. [46.195.138.73])
by mx.google.com with ESMTPSA id y11sm28805049lbm.13.2013.12.30.15.27.41
for <ratpoison-devel@nongnu.org>
(version=TLSv1.2 cipher=RC4-SHA bits=128/128);
Mon, 30 Dec 2013 15:27:41 -0800 (PST)
Date: Tue, 31 Dec 2013 00:27:37 +0100
From: Vasil Zlatanov <vasil.zlatanov@gmail.com>
To: ratpoison-devel@nongnu.org
Subject: Small Update rpws
Message-ID: <20131230232733.GA17881@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature"; boundary="aM3YZ0Iwxop3KEKx"
Content-Disposition: inline
User-Agent: Mutt/1.5.21 (2010-09-15)
--aM3YZ0Iwxop3KEKx
Content-Type: multipart/mixed; boundary="FL5UXtIhxfXey3p5"
Content-Disposition: inline
--FL5UXtIhxfXey3p5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
I've been asked a few times on IRC about a command to move the current
window to a selected workspace, which is undocemented for some reason.
Addionaly I added an option that prints the current workspace which
would be usefull for conky like configs.
--FL5UXtIhxfXey3p5
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="vaskozl-rpws_updates.patch"
Content-Transfer-Encoding: quoted-printable
=46rom 708fa69f48f10dcbefc20633f553db660be47b24 Mon Sep 17 00:00:00 2001
=46rom: Vasil Zlatanov <vasil.zlatanov@gmail.com>
Date: Tue, 31 Dec 2013 00:08:15 +0100
Subject: [PATCH] Updated rpws to documents the "rpwsm$i" functionality, made
it's bindings more sane and added an option "current" which prints the
current workspace.
---
contrib/rpws | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/contrib/rpws b/contrib/rpws
index 49105c5..558fd1c 100755
--- a/contrib/rpws
+++ b/contrib/rpws
@@ -1,5 +1,10 @@
#!/usr/bin/env perl
=20
+# Copyright (c) 2013 Vasil Zlatanov <vasil.zlatanov@gmail.com>
+# All rights reserved. Modifications under same license as original script.
+# Changelog:
+# Updated manpage and hotkeys
+# Added argument current which outputs the current workspace.
#
# Copyright (c) 2009 Hatem Nassrat <hnassrat@gmail.com>
# All rights reserved. Modifications under same license as original script.
@@ -245,7 +250,7 @@ sub add_keys
# Switch Workspace
rp_call ( "definekey top M-F$i rpws$i" );
# Move Window to wrokspace
- rp_call ( "definekey top C-M-S-F$i rpwsm$i" );
+ rp_call ( "definekey top C-M-F$i rpwsm$i" );
}
rp_call ( "definekey top C-M-Right rpwsn" );
rp_call ( "definekey top C-M-Left rpwsp" );
@@ -270,6 +275,9 @@ if( $arg eq "help" ) {
} elsif( $arg eq "restore" ) {
my $filename =3D shift @ARGV;
ws_dumprestore($filename);
+} elsif ( $arg eq "current" ) {
+ my $cws =3D rp_call( "getenv wspl" );
+ print "$cws";
} else {
open LOCK, ">>$lockfile" or die "Cannot open lockfile: $lockfile";
flock(LOCK, LOCK_EX);
@@ -287,10 +295,11 @@ rpws - Implements multiple workspaces in ratpoison
rpws init n [-k] [-a] - setup rpws with n workspaces.
-a sets up command aliases;
-k sets up key bindings and aliases.
+ rpws n - switch to this workspace
rpws dump <fname> - dumps the current layout to <fname>
rpws restore <fname> - restores rpws workspaces from <fname>
+ rpws current - print the number of the current workspace
rpws help - this documentation
- rpws n - switch to this workspace
=20
=20
=3Dhead1 DESCRIPTION
@@ -306,14 +315,15 @@ Add the following line in ~/.ratpoisonrc
exec /path/to/rpws init 6 -k
=20
This creates 6 aliases rpws1, rpws2, etc. It also binds the keys M-F1,
-M-F2, etc to each rpwsN alias. Moreover, rpwsn (Next) and rpwsp (Prev) are
+M-F2, etc to each rpwsN alias. Aliases rpwsm1, rpwsm2, etc, are used to
+move the focused window to another workspace. Moreover, rpwsn (Next) and r=
pwsp (Prev) are
created, and C-M-{Right,Left} are bound to rpws{n,p}. Full list of keybind=
ings
created are:
=20
M-F$i Goto workspace $i
C-M-Right Goto Next workspace
C-M-Left Goto Prev workspace
- C-M-S-F$i Move window to workspace $i
+ C-M-F$i Move window to workspace $i
C-M-greater Move current window to next workspace
C-M-less Move current window to prev workspace
=20
--=20
1.8.3.2
--FL5UXtIhxfXey3p5--
--aM3YZ0Iwxop3KEKx
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
iQEcBAEBAgAGBQJSwgFlAAoJEO5QSAKJUTTF15kH/jXFv4f2EfuerBuTmIZnDv5K
Fwse5ECcSNtxAol8x+irCY7ycEzfC9QXuCTKneQE04gooqkQ/iOzGo9FxQFGiHeD
N51Dsxg9pISFPuILMtVBc6idGplYF/P656C0TdMNQe8XCsCSoZCSJBHeVqkmkKqy
rcmmePz8uGJhGFCsgLAFvRIKE79M+Ap6NRMbo2jdlGoHm3QN2FjqJX1OmrjQgUY6
PjubVjQBQlCiYF9hqcce3y0nBR0moA3E/mSkQZAEcezddJaFUXcHsM7wDifMSsts
lMO9o9PuAkSC5I4gLLnFzhgJFCedv8nqeD1oHZSCGUvqp44PMLlBWZIhpRin5TM=
=Esdd
-----END PGP SIGNATURE-----
--aM3YZ0Iwxop3KEKx--
|